/*
* @Author: zhangqiaojuan
* @Date: 2023-06-10 10:31:20
* @LastEditors: Yejing
* @LastEditTime: 2023-06-30 16:50:24
* @Description: desc
*/
<template>
    <view class="">
        <c-layout>
            <c-navigation-bar navbar-bg-color="#1B1D29" slot="head" left-icon-color="#fff" title="动态"
                              title-color="#fff">
            </c-navigation-bar>
            <view class="content-group">
                <view class="date-group">
                    <view class="date-text">
                        {{ searchDate }}
                    </view>
                    <view class="to-get" @click="show = true">
                        <u-icon name="arrow-right"></u-icon>
                    </view>
                </view>
                <u-calendar v-model="show" mode="date" :min-date="startDay" max-date="3000-1-1"
                            @change="change"></u-calendar>
                <view class="list-group">
                    <view class="dynamic-list">
                        <view v-for="(item,index) in productList" :key="index" class="dynamic-item">
                            <lineProductCard :card="item" type="money" :arrowRight="false"></lineProductCard>
                        </view>
                    </view>
                    <!-- <uni-list class="dynamic-list">
                      <uni-list-item v-for="(item,index) in productList" :key="index" class="dynamic-item">
                        <view slot="body" class="">
                          <lineProductCard :card="item" type="money" :arrowRight="false"></lineProductCard>

                        </view>
                      </uni-list-item>
                    </uni-list> -->
                </view>
            </view>
            <shopTabbar :shopId="followUrlData.shopId" slot="footer" :current="2"></shopTabbar>
        </c-layout>

    </view>
</template>

<script>
import lineProductCard from "@/pages/searchInfo/components/productCard.vue"
import shopTabbar from "@/pages/shop/components/tabBar.vue"

export default {
    components: {
        lineProductCard,
        shopTabbar
    },
    data() {
        return {
            show: false,
            startDay: '',
            searchDate: '',
            productList: [{
                name: 'Roller Rabbit',
                info: 'vadio Olderf ddfdsf',
                money: '198',
                url: 'https://cdn.uviewui.com/uview/swiper/1.jpg'
            }],
            followUrlData: {}
        }
    },
    onLoad(val) {
        this.followUrlData = val
    },
    created() {
        this.startDay = this.$u.timeFormat(new Date(), 'yyyy-mm-dd');
        this.searchDate = this.$u.timeFormat(new Date(), 'yyyy-mm-dd');
    },
    methods: {
        change(e) {
            console.log(e);
            this.searchDate = e.result;
            console.log(this.searchDate)
        },
    }
}
</script>

<style lang="scss" scoped>
.content-group {
  background-image: linear-gradient(#1B1D29 180px, #1B1D29 50px, #fff, #fff, #fff);
}

.date-group {
  // position: fixed;
  // top: 160rpx;
  // left: 0;
  // width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #FFFFFF;
  font-size: 28rpx;
  height: 100rpx;
  line-height: 100rpx;
  padding: 0 38rpx;
  z-index: 99;
  background-color: #1B1D29;
}

.list-group {
  .dynamic-list {
    width: 100%;
    height: calc(100vh - 500rpx);
    overflow: scroll;
    background: #FFFFFF;
    border-radius: 60rpx 60rpx 0rpx 0rpx;
    padding: 40rpx 40rpx 200rpx 30rpx;
  }
}
</style>
